function calculateFee()
{
	if ((document.getElementById("addFee").checked)){
		document.getElementById("feeCovered").innerHTML = parseFloat(document.getElementById("preview").innerHTML).toFixed(2);
		document.getElementById("total").innerHTML = (parseFloat(document.getElementById("donation").innerHTML) + parseFloat(document.getElementById("feeCovered").innerHTML)).toFixed(2);
	} else {
		document.getElementById("feeCovered").innerHTML = "0.00";
		document.getElementById("total").innerHTML = (parseFloat(document.getElementById("donation").innerHTML)).toFixed(2);
	} 
}
function calculatePreviewFee()
{	
	if ((document.getElementById("cash").value != "") && (!isNaN(document.getElementById("cash").value))){
		var taxAmount = ((parseFloat(document.getElementById("cash").value) * .022) + .30);	
		document.getElementById("preview").innerHTML = taxAmount.toFixed(2);
		document.getElementById("donation").innerHTML = (parseFloat(document.getElementById("cash").value)).toFixed(2);
		calculateFee();
	} else {
		document.getElementById("preview").innerHTML = "0.30";
		document.getElementById("donation").innerHTML = "0.00";
		calculateFee();
	}
}
function getTotalDonation()
{
	document.getElementById("finalTotal").value = document.getElementById("total").innerHTML;
}
function checkForOneTime()
{
	if ((document.getElementById("times").value) == 1){
		document.getElementById("recurring").style.display = "none";
		document.getElementById("finalTotal").name = "amount";
		document.getElementById("command").value = "_xclick";
		document.getElementById("itemName").value = "CDB One Time " + $("input[name='tier2']").filter(":checked").val();
	} else {
		document.getElementById("recurring").style.display = "block";
		document.getElementById("finalTotal").name = "a3";
		document.getElementById("command").value = "_xclick-subscriptions";
		document.getElementById("itemName").value = "CDB Recurring " + $("input[name='tier2']").filter(":checked").val();
	}
}